<%@ page import="kgc.pojo.News_Category" %>
<%@ page import="kgc.pojo.News_User" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/6
  Time: 13:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        int num = (int) session.getAttribute("num");
        if (num == 1){
            Object attribute = session.getAttribute("category");
            News_Category category = (News_Category) attribute;
            %>
    <div>
        <form action="update.jsp">
            <input type="text" name="newsid" value="<%=category.getId()%>" hidden><br/>
            name:<input type="text" name="newsName" value="<%=category.getName()%>"><br/>

            <input type="submit" value="修改">
        </form>
    </div>
        <%
            }else if (num == 2){
                Object attribute1 = session.getAttribute("user");
                News_User user = (News_User) attribute1;
            %>
    <div>
        <form action="update.jsp">
            <input type="text" name="userid" value="<%=user.getId()%>" hidden><br/>
            userName:<input type="text" name="username" value="<%=user.getUserName()%>"><br/>
            password:<input type="text" name="password" value="<%=user.getPassword()%>"><br/>
            email:<input type="text" name="email" value="<%=user.getEmail()%>"><br/>
            userType:<input type="text" name="type" value="<%=user.getUserType()%>"><br/>
            <input type="submit" value="修改">
        </form>
    </div>
            <%
                }
            %>


</body>
</html>
